Who and whom in formal English:
English learners are sometimes confused when using who and whom. Who and whom are pronouns used in questions or in relative clauses.
Who is usually used for the doer and Whom is used for the receiver.
In formal English who is used to replace a subject, while whom is used to replace an object.
Who:
Who is a subjective pronoun.
Examples:
Leila is the teacher. - - (Leila is the subject of the sentence. )
→ Who is the teacher?
→ Leila, who is the English teacher, will give a talk about women rights.
Whom:
Whom is used to replace an object.
Examples:
You have met Alex. - - (Alex is the object of the sentence. )
→ Whom have you met?
→ This is Alex, whom I believe you have already met.